package com.sijibao.gather.producer.kafka;


import com.sijibao.gather.util.NetUtils;

public class KafkaProducerConfig
{
	private String bootstrapServers;
	private String clientId;
	private String topic;

	public KafkaProducerConfig(String bootstrapServers,String clientIdPrefix,String topic)
	{
		super();
		this.bootstrapServers = bootstrapServers;
		this.clientId = clientIdPrefix+"-"+NetUtils.getLocalAddress().getHostAddress();
		this.topic = topic;
	}

	public String getTopic()
	{
		return topic;
	}

	public void setTopic(String topic)
	{
		this.topic = topic;
	}

	public String getBootstrapServers()
	{
		return bootstrapServers;
	}

	public void setBootstrapServers(String bootstrapServers)
	{
		this.bootstrapServers = bootstrapServers;
	}

	public String getClientId()
	{
		return clientId;
	}

	public void setClientId(String clientId)
	{
		this.clientId = clientId;
	}

	@Override
	public String toString()
	{
		return "KafkaConfig [bootstrapServers=" + bootstrapServers
				+ ", clientId=" + clientId + ", topic=" + topic + "]";
	}

}
